package com.zgjkhis.modules.system.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName Drug
 * @Deacription 药品
 * @Author yzq
 * @Date 2021/6/24 9:52
 * @Version 1.0
 **/
@Data
@TableName("his_drug")
public class Drug implements Serializable {

    @TableId
    private Long id;
    @ApiModelProperty(value = "药品名称",required = true)
    @NotBlank(message = "药品名称不能为空")
    private String drugName;
    @ApiModelProperty(value = "库位号")
    private String drugNo;
    @ApiModelProperty(value = "规格")
    @NotBlank(message = "规格不能为空")
    private String drugSpec;
    @ApiModelProperty(value = "生产厂家",required = true)
//    @NotBlank(message = "生产厂家不能为空")
    private String drugManufactor;
    @ApiModelProperty(value = "剂量单位(当药品分类为3，4，5时，为最小剂量单位)",required = true)
    @NotBlank(message = "剂量单位不能为空")
    private String doseUnit;
    @ApiModelProperty(value = "包装单位",required = true)
    @NotBlank(message = "包装单位不能为空")
    private String packageUnit;
    @ApiModelProperty(value = "零售价",required = true)
    @NotNull(message = "零售价不能为空")
    private BigDecimal salePrice;
    @ApiModelProperty(value = "状态：0：正常1：失效",required = true)
    @NotNull(message = "状态不能为空")
    private Integer status;
    /** 创建时间 */
    @TableField(fill= FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "库存预警")
    private Integer stockWarning;
    @ApiModelProperty(value = "库存")
    private Integer stock;
    @ApiModelProperty(value = "最小单位库存")
    private Integer minStock;
    @ApiModelProperty(value = "药品分类1:中药饮片，2：配方颗粒，3：中成药，4：西药，5：耗材，6敷贴粉剂",required = true)
    @NotNull(message = "药品分类不能为空")
    private Integer drugType;
    @ApiModelProperty(value = "当量（当药品分类为2时,有值，存在）")
    private Double drugEquivalent;
    @ApiModelProperty(value = "剂型(当药品分类为3，4，5时，有值，存在)")
    private String doseForm;
    @ApiModelProperty(value = "药品编码(当药品分类为3，4，5时，有值，存在)")
    private String drugCode;
    @ApiModelProperty(value = "批准文号(当药品分类为3，4，5时，有值，存在)")
    private String approvalNumber;
    @ApiModelProperty(value = "最小剂量(当药品分类为3，4，5时，有值，存在)")
    private BigDecimal minDose;
    @ApiModelProperty(value = "总剂量(当药品分类为3，4，5时，有值，存在)")
    private Integer totalDose;
    @ApiModelProperty(value = "总剂量单位(当药品分类为3，4，5时，有值，存在)")
    private String totalDoseUnit;
    @ApiModelProperty(value = "是否拆零：0：是，1：否(当药品分类为3，4，5时，有值，存在)")
    private Integer isSellPiece;
    @ApiModelProperty(value = "拆零价格（当是拆零，可填）(当药品分类为3，4，5时，有值，存在)")
    private BigDecimal sellPiecePrice;
    @ApiModelProperty(value = "是否皮试：0：是，1：否(当药品分类为3，4，5时，有值，存在)")
    private Integer isSkin;
    @ApiModelProperty(value = "是否限售(当药品分类为3，4，5时，有值，存在)")
    private Integer isSales;
    @ApiModelProperty(value = "单次剂量(当药品分类为3，4，5时，有值，存在)")
    private BigDecimal singleDose;
    @ApiModelProperty(value = "用法(当药品分类为3，4，5时，有值，存在)")
    private String drugUse;
    @ApiModelProperty(value = "频次(当药品分类为3，4，5时，有值，存在)")
    private String drugFrequency;
    @ApiModelProperty(value = "首字母拼音")
    private String pinyin;
    @ApiModelProperty(value = "药房id",required = true)
    @NotNull(message = "药房id不能为空")
    private String pharmacyId;
    @ApiModelProperty(value = "月使用量")
    private Integer mothUse;
    @ApiModelProperty(value = "月使用量")
    private Integer minMothUse;
    @ApiModelProperty(value = "换算系数")
    private Double coefficient;
    @ApiModelProperty(value = "换算系数名字")
    private String coefficientName;
}
